import React from "react";
/* import { Redirect } from "react-router-dom"; */

const Home = React.lazy((_) => import("../pages/home"));
const Notice = React.lazy((_) => import("../pages/notice"));
const Circus = React.lazy((_) => import("../pages/circus"));
const Message = React.lazy((_) => import("../pages/message"));
const Profile = React.lazy((_) => import("../pages/profile"));
const Detail = React.lazy((_) => import("../pages/detail"));
const Publish = React.lazy(() => import("../pages/publish"));
const Login = React.lazy((_) => import("../pages/login"));
const UpdateProfile = React.lazy((_) =>
  import("../pages/profile/update-profile")
);
const Search = React.lazy((_) => import("../pages/search"));
const OtherUser = React.lazy((_) => import("../pages/other-user"));

const routes = [
  {
    path: "/home",
    component: Home,
  },
  {
    path: "/circus",
    component: Circus,
  },
  {
    path: "/message",
    component: Message,
  },
  {
    path: "/profile",
    component: Profile,
  },
  {
    path: "/detail",
    component: Detail,
  },
  {
    path: "/publish",
    component: Publish,
  },
  {
    path: "/login",
    component: Login,
  },
  {
    path: "/update-profile",
    component: UpdateProfile,
  },
  {
    path: "/search",
    component: Search,
  },
  {
    path: "/other_user",
    component: OtherUser,
  },
];

export default routes;
